#include<iostream>
using namespace std;

#include"list.h"
#include"reverse_iterator.h" 
#include"stack.h"
#include"queue.h"
#include"priority_queue.h"

void teststack1()
{
	mystack::stack<int> st;
	st.push_back(1);
	st.push_back(2);
	st.push_back(3);
	st.push_back(4);
	st.push_back(5);

	//for (int i = 0; i < st.size(); i++)
	//{
	//	
	//	cout << st.top() << " ";
	//}

	while (!st.empty())
	{
		cout << st.top() << " ";

		st.pop();
	}
}
void testqueue()
{
	myqueue::queue<int> q;

	q.push(1);
	q.push(2);
	q.push(3);
	q.push(4);
	q.push(5);
	q.push(6);

	while (!q.empty())
	{
		cout<<q.front()<<" ";
		q.pop();
	}
	cout << endl;

}


void test1()
{
	MyList::list<int> it;
	it.push_back(1);
	it.push_back(2);
	it.push_back(3);
	it.push_back(4);
	it.push_back(5);

	//MyList::list<int>::iterator it1 = it.end();

	auto  lt = it.begin();

	while (lt != it.end())
	{
		cout << *lt << " ";
		++lt;
	}
	cout << endl;
	auto rlt = it.rbegin();
	while (rlt != it.rend())
	{
		cout << *rlt << " ";
		++rlt;
	}
	cout << endl;

}


void test2()
{
	mypriority_queue::priority_queue<int> pq;
	pq.push(1);
	pq.push(3);
	pq.push(4);
	pq.push(6);
	pq.push(9);

	while (!pq.empty())
	{
		cout << pq.top() << " ";
		pq.pop();
	}
	cout << endl;


}

int main()
{
	test2();

	return 0;
}